<template>
	<view>
		<view v-if="info==null">
			<zero-loading type="triangle"></zero-loading>
		</view>
		<view v-if="info!=null">
		<view  style="height: 30rpx;"></view>
		<view class="succ_img">
			<image src="../../static/images/icon51.png" mode=""></image>
		</view>
		<view class="succ_tip">
			{{info.price}}
		</view>
		<view class="succ_tip_title">
			提现金额(元)
		</view>
		<view class="withdrawalDetail_box">
			<view class="withdrawalDetail_item_box">
				<view class="withdrawalDetail_item_name">当前状态</view>
				<view class="withdrawalDetail_item_desc" v-if="info.status==0">待审核</view>	
				<view class="withdrawalDetail_item_desc" v-if="info.status==1">已通过</view>	
				<view class="withdrawalDetail_item_desc" v-if="info.status==2">已拒绝</view>	
			</view>
			<view class="withdrawalDetail_item_box">
				<view class="withdrawalDetail_item_name">提现来源</view>
				<view class="withdrawalDetail_item_desc" v-if="info.type==1">账户余额</view>	
				<view class="withdrawalDetail_item_desc" v-if="info.type==2">保证金</view>	
			</view>
			<view class="withdrawalDetail_item_box">
				<view class="withdrawalDetail_item_name">扣除税点</view>
				<view class="withdrawalDetail_item_desc">¥{{info.tax_rate}}</view>	
			</view>
			<view class="withdrawalDetail_item_box">
				<view class="withdrawalDetail_item_name">扣除手续费</view>
				<view class="withdrawalDetail_item_desc">¥{{info.service_price}}</view>	
			</view>
			<view class="withdrawalDetail_item_box">
				<view class="withdrawalDetail_item_name">实际到账</view>
				<view class="withdrawalDetail_item_desc">¥{{info.actual_price}}</view>	
			</view>
			<view class="withdrawalDetail_item_box">
				<view class="withdrawalDetail_item_name">到账方式</view>
				<view class="withdrawalDetail_item_desc" v-if="info.to_account==1">银行卡</view>
				<view class="withdrawalDetail_item_desc" v-if="info.to_account==2">收款码</view>	
			</view>
			<view class="withdrawalDetail_item_box">
				<view class="withdrawalDetail_item_name">提交时间</view>
				<view class="withdrawalDetail_item_desc">{{info.created_at}}</view>	
			</view>
			<view class="withdrawalDetail_item_box" v-if="info.resource!=null" style="align-items: flex-start;">
				<view class="withdrawalDetail_item_name">凭证</view>
				<view class="withdrawalDetail_item_img" @click="handlePreview(info.resource)">
					<image :src="info.resource" mode="widthFix"></image>
				</view>	
			</view>
		</view>
	
	</view>
	</view>
</template>

<script>
	import zeroLoading from "@/components/zero-loading/components/zero-loading/zero-loading.vue"
	export default {
		components: {
			zeroLoading
		},
		data() {
			return {
				id:0,
				info:null,
			};
		},
		onLoad(e) {
			var a = this
			a.id = e.id
			a.getDetail()
		}, 
		methods:{
			handlePreview(url){
				uni.previewImage({
					current: 0,
					urls: [url],
					loop: true,
					longPressActions: true	
				})
			},
			goIndex(){
				uni.navigateBack()
			},
			getDetail(){
				var a =this
				uni.showLoading({
					title:'加载中'
				})
				a.globalajax('user/withdrawalInfo',{
					id:a.id
					},'GET',function(res) {
						console.log(res);
						uni.hideLoading()
						uni.stopPullDownRefresh()
						if(res.data.code==200){
							a.info = res.data.data
						}else{
							a.$showModal({
								title:'友情提示',
								content:res.data.msg,
								showCancel:false,
								confirmText:'我知道了',
								success: (res) => {
								}
							}); 
						} 
					}
				); 
			}, 
		}
	}
</script>

<style lang="scss">
.succ_img{
	width: 144rpx;
	height: 144rpx;
	margin: 0 auto; 
	image{
		width: 100%;
		height: 100%;
	}
}
.succ_tip{
	text-align: center;
	font-weight: bold;
	color: rgba(48, 49, 51, 1);
	font-size: 64rpx;
	margin-top: 28rpx;
}
.succ_tip_title{
	text-align: center;
	color: rgba(48, 49, 51, 1);
	font-size: 30rpx;
}
.succ_tip1{
	text-align: center;
	color: rgba(144, 147, 153, 1);
	font-size: 24rpx;
	width: 70%;
	margin: 0 auto;
	margin-top: 28rpx;
	line-height: 40rpx;
}
.withdrawalDetail_box{
	width: 686rpx;
	/*background-color: rgba(245, 246, 248, 1);*/
	margin: 0 auto;
	margin-top: 30rpx;
	padding-top: 20rpx;
	padding-bottom: 20rpx;
	.withdrawalDetail_item_box{
		display: flex;
		align-items: center;
		padding-top: 12rpx;
		padding-bottom: 12rpx;
		.withdrawalDetail_item_name{
			margin-left: 24rpx;
			width: 176rpx;
			color: rgba(96, 98, 102, 1);
			font-size: 28rpx;
		}
		.withdrawalDetail_item_desc{
			color: rgba(48, 49, 51, 1);
			font-size: 28rpx;
		}
		.withdrawalDetail_item_img{
			width: 300rpx;
			height: auto;
			image{
				width: 300rpx;
			}
		}
	}
}
.succ_tip_btn{
	width: 200rpx;
	height: 72rpx;
	text-align: center;
	line-height: 72rpx;
	background-color: rgba(255, 107, 0, 1);
	border-radius: 12rpx;
	color: #fff;
	font-size: 28rpx;
	margin: 0 auto;
	margin-top: 50rpx;
}
</style>
